package com.shanzhu.hospital.entity.vo;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shanzhu.hospital.entity.po.Surgery;
import com.shanzhu.hospital.entity.vo.base.PageBase;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@EqualsAndHashCode(callSuper = true) //保持对象比较的完整性 符合equals契约 避免潜在bug
@Data
public class SurgeryPageVo extends PageBase {

    /**
     * 病床
     */
    private List<Surgery> surgerys;

    /**
     * 填充分页信息
     *
     * @param iPage 分页对象
     */
    public void populatePage(IPage iPage) {
        super.populatePage(iPage);
        this.surgerys = iPage.getRecords();
    }

}
